package com.yunhe.common.model.base;

/**
 * @date 20190328
 * 改为异常名称
 */
public class AlarmStatus extends StatusType {

    private Integer bit;
    private String devTitle;
    private String condition;
    private Boolean alarm;
    private Double limitValue;
    private Long stationCode;
    private AlarmType alarmType;
    private AlarmLevel alarmLevel;
    private String alarmLevelTitle;

    public AlarmLevel getAlarmLevel() {
        return alarmLevel;
    }

    public void setAlarmLevel(AlarmLevel alarmLevel) {
        this.alarmLevel = alarmLevel;
    }

    public AlarmType getAlarmType() {
        return alarmType;
    }

    public void setAlarmType(AlarmType alarmType) {
        this.alarmType = alarmType;
    }

    public Long getStationCode() {
        return stationCode;
    }

    public void setStationCode(Long stationCode) {
        this.stationCode = stationCode;
    }

    public String getDevTitle() {
        return devTitle;
    }

    public void setDevTitle(String devTitle) {
        this.devTitle = devTitle;
    }

    public String getCondition() {
        return condition;
    }

    public void setCondition(String condition) {
        this.condition = condition;
    }

    public Boolean getAlarm() {
        return alarm;
    }

    public void setAlarm(Boolean alarm) {
        this.alarm = alarm;
    }

    public Double getLimitValue() {
        return limitValue;
    }

    public void setLimitValue(Double limitValue) {
        this.limitValue = limitValue;
    }

    public Integer getBit() {
        return bit;
    }

    public void setBit(Integer bit) {
        this.bit = bit;
    }

    public String getAlarmLevelTitle() {
        if (alarmLevel != null) {
            return alarmLevel.getTitle();
        } else {
            return alarmLevelTitle;
        }
    }

    public void setAlarmLevelTitle(String alarmLevelTitle) {
        this.alarmLevelTitle = alarmLevelTitle;
    }
}
